import http from '@src/util/http';
let prefix = '/api/warehouse';

/**
 * @description 获取产品子表单可以使用的产品字段
 */
export const getProductFieldList = (params = {}) => {
  return http.get(`/api/paas/outside/pc/formField/getProductFieldList`, params);
};

/**
 * 
 * @param {Object} params - 参数
 */
export function getMaterialAllFields(params: {} | undefined) {
  return http.get(`${prefix}/outside/setting/material/allFields`, params);
}


/**
 * @description - 查询服务商列表
 * @param {Object} params - 参数
 */
export function getProviderData(params: any) {
  return http.post('/api/app/outside/provider/getProviderData', params);
}

/**
 * @description - 查询服务商子表单关联字段列表
 * @param {Object} params - 参数
 */
export function getServiceProviderFields(params: any) {
  return http.get('/api/app/outside/provider/getFieldList', params);
}

/**
 * @description 产品类型 物料清单字段查询
 * @returns
 */
export function getProductMaterialFields(params: {} | undefined) {
  return http.get('/api/customer/outside/pc/catalog/material/allFields', params);
}

/**
 * @description 工单完成回执 物料清单字段查询
 * @returns
 */
export function getTaskMaterialFields(params: {} | undefined) {
  return http.get('/api/task/outside/pc/warehouse/setting/material/allFields', params)
}